<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
</head>
<body>
<h1>hello huahua</h1>

<button id="send">send</button>

<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>

    const data = {
      name: 'hua',
      age: 22,
      breed: 'test'
    }

    $("#send").on("click", () => {
      $.ajax({
        type: 'post',
        url: '/cats/add1',
        data,
        success: function(r) {
          console.log(r);
        }
      })
    })


</script>
</body>
</html>
